Alex Crichton [Mon, 21 Sep 2015 19:02:46 +0000 (12:02 -0700)]
Don't use an 8MB stack any more
Now that the resolver isn't recursive this shouldn't be necessary
Alex Crichton [Mon, 21 Sep 2015 16:17:37 +0000 (09:17 -0700)]
Merge branch 'non-recursive-activate' of https://github.com/jyasskin/cargo
bors [Sun, 20 Sep 2015 05:05:03 +0000 (05:05 +0000)]
Auto merge of #1992 - carols10cents:cleanup, r=alexcrichton
Hiii! These are just a few small cleanup things that I took care of while working on #1991, but these should all be less controversial than that one is :)
Carol (Nichols || Goulding) [Sun, 20 Sep 2015 03:47:53 +0000 (23:47 -0400)]
Fixing typos and grammar in comments
Carol (Nichols || Goulding) [Sat, 19 Sep 2015 18:39:34 +0000 (14:39 -0400)]
Remove unnecessary PathSource update in cargo test
I don't think updating the source here is hurting anything, per se, it's
just unnecessary since ops::compile makes a PathSource and then calls
root_package, which will call update if it needs to.
Carol (Nichols || Goulding) [Sat, 19 Sep 2015 14:41:06 +0000 (10:41 -0400)]
Move test to a more appropriate location
This test isn't testing generate-lockfile at all-- it's generating a
lockfile with `\r\n` in it in the test itself and then testing that
building will succeed even if there are `\r\n`s in the lockfile.
Given that generate-lockfile could change and have no effect on this
test, I think this fits in better with the other `cargo build` tests.
Carol (Nichols || Goulding) [Sat, 19 Sep 2015 14:36:07 +0000 (10:36 -0400)]
Remove unneeded commented-out code
Jeffrey Yasskin [Thu, 17 Sep 2015 03:37:45 +0000 (20:37 -0700)]
Make Dependency cheap to copy by having it store a refcounted inner object.
bors [Wed, 16 Sep 2015 17:34:50 +0000 (17:34 +0000)]
Auto merge of #1988 - alexcrichton:bump, r=brson
I'll tag 0.5.0 with the previous commit after this is merged.
Alex Crichton [Wed, 16 Sep 2015 16:35:43 +0000 (09:35 -0700)]
Bump to 0.6.0
bors [Mon, 14 Sep 2015 21:48:44 +0000 (21:48 +0000)]
Auto merge of #1986 - mneumann:dragonfly-snapshot, r=alexcrichton
http://www.ntecs.de/downloads/rust/cargo-nightly-x86_64-unknown-dragonfly.tar.gz
This is the 0.5 version of cargo as it's much harder to build an old snapshot.
Michael Neumann [Sun, 13 Sep 2015 20:24:43 +0000 (22:24 +0200)]
Add snapshot for DragonFly
http://www.ntecs.de/downloads/rust/cargo-nightly-x86_64-unknown-dragonfly.tar.gz
This is the 0.5 version of cargo as it's much harder to build an old snapshot.
bors [Sun, 13 Sep 2015 17:45:35 +0000 (17:45 +0000)]
Auto merge of #1949 - nicokoch:fix-1904, r=alexcrichton
This flag can be used to force cargo to run all tests, even if previous
tests failed. See #1904
Nicolas Koch [Sat, 12 Sep 2015 11:27:01 +0000 (13:27 +0200)]
Various small changes to cargo_test and friends.
- Reworked CargoTestError to contain Vec<ProcessError>
- Remove #[allow(trivial_casts)]
- Coding style fixes
Nicolas Koch [Thu, 10 Sep 2015 00:42:04 +0000 (02:42 +0200)]
Restructure cargo_test code and introduce CargoTestError
bors [Wed, 9 Sep 2015 23:26:08 +0000 (23:26 +0000)]
Auto merge of #1981 - alexcrichton:git-stamp-if-dead, r=brson
We already take this strategy for extracting tarballs from crates.io for
example, so this just applies the same strategy to checkouts of git repos.
Closes #1979
Alex Crichton [Wed, 9 Sep 2015 22:44:43 +0000 (15:44 -0700)]
Use a stamp file to protect against corrupt checkouts
We already take this strategy for extracting tarballs from crates.io for
example, so this just applies the same strategy to checkouts of git repos.
Closes #1979
Jeffrey Yasskin [Wed, 9 Sep 2015 03:04:27 +0000 (20:04 -0700)]
Fix another round of comments.
bors [Wed, 9 Sep 2015 00:06:37 +0000 (00:06 +0000)]
Auto merge of #1975 - alexcrichton:dont-capture-rustdoc, r=brson
We already started doing this for the compiler awhile back, so this just brings
rustdoc up to the same parity
bors [Tue, 8 Sep 2015 23:48:52 +0000 (23:48 +0000)]
Auto merge of #1972 - alexcrichton:update-curl, r=brson
Includes a fix for #1937 to not panic on downloading crates on newer OSX
versions.
Closes #1937
Alex Crichton [Tue, 8 Sep 2015 17:39:15 +0000 (10:39 -0700)]
Don't capture rustdoc output for transitive deps
We already started doing this for the compiler awhile back, so this just brings
rustdoc up to the same parity
bors [Tue, 8 Sep 2015 20:50:12 +0000 (20:50 +0000)]
Auto merge of #1974 - alexcrichton:dont-document-build, r=brson
They're not actually relevant to the documentation, so omit them.
Alex Crichton [Sat, 5 Sep 2015 00:30:59 +0000 (17:30 -0700)]
Don't document build dependencies
They're not actually relevant to the documentation, so omit them.
bors [Tue, 8 Sep 2015 20:32:06 +0000 (20:32 +0000)]
Auto merge of #1973 - alexcrichton:cargo-doc-release, r=brson
While this may not necessarily make sense all the time, this enables Cargo to
not rebuild anything if a `cargo build --release` was previously executed.
Alex Crichton [Sat, 5 Sep 2015 00:09:24 +0000 (17:09 -0700)]
Add --release flag to `cargo doc`
While this may not necessarily make sense all the time, this enables Cargo to
not rebuild anything if a `cargo build --release` was previously executed.
bors [Tue, 8 Sep 2015 17:45:03 +0000 (17:45 +0000)]
Auto merge of #1969 - carols10cents:really-use-git, r=alexcrichton
Fixes #1210. If either `--vcs git` or `--vcs hg` is specified, assume
that means the user really wants the new project to use that VCS, even
if the project's location would be beneath an existing repository.
This was surprisingly easy! And would make me so happy-- my home dir is a git repo :)
Alex Crichton [Tue, 8 Sep 2015 17:39:40 +0000 (10:39 -0700)]
Update curl bindings
Includes a fix for #1937 to not panic on downloading crates on newer OSX
versions.
Closes #1937
Carol (Nichols || Goulding) [Sun, 6 Sep 2015 19:52:13 +0000 (15:52 -0400)]
If --vcs flag specified, use vcs even if under an existing repo
Fixes #1210. If either `--vcs git` or `--vcs hg` is specified, assume
that means the user really wants the new project to use that VCS, even
if the project's location would be beneath an existing repository.
Jeffrey Yasskin [Sat, 5 Sep 2015 05:02:01 +0000 (22:02 -0700)]
Round 2 of review:
* Converted pre-existing trace!s back from debug!
* Computed `cur` from the top-most frame instead of storing it.
* Wrapped to 80 columns.
* Removed prev_active and all_candidates from `BacktrackStack`
* Removed unnecessary type annotations.
* Called activation_error() only when starting to backtrack, since it bailed
early when passed an error anyway.
bors [Fri, 4 Sep 2015 17:40:35 +0000 (17:40 +0000)]
Auto merge of #1966 - alexcrichton:fix-doc-again, r=huonw
It's possible to have multiple dependencies of the same name for a project if a
dependency shows up multiple times as a target-specific dependency. This means
that we can't just find the first one with the relevant name and assume it's the
right one, we instead need to check all of them.
Alex Crichton [Fri, 4 Sep 2015 17:33:11 +0000 (10:33 -0700)]
Fix documenting target-specific dependencies for real
It's possible to have multiple dependencies of the same name for a project if a
dependency shows up multiple times as a target-specific dependency. This means
that we can't just find the first one with the relevant name and assume it's the
right one, we instead need to check all of them.
bors [Thu, 3 Sep 2015 17:06:43 +0000 (17:06 +0000)]
Auto merge of #1961 - alexcrichton:fix-doc-target-specific, r=huonw
The recent change in #1939 ended up accidentally pulling in irrelevant
platform-specific dependencies into a normal `cargo doc`, causing those builds
to fail. This change tweaks the logic for calculating documentation dependencies
to account for filtering based on the relevant platform.
bors [Thu, 3 Sep 2015 16:28:44 +0000 (16:28 +0000)]
Auto merge of #1964 - steveklabnik:doc_fix, r=alexcrichton
This has changed, apparently.
Steve Klabnik [Thu, 3 Sep 2015 16:28:30 +0000 (12:28 -0400)]
Fix syntax in build-script
This has changed, apparently.
bors [Wed, 2 Sep 2015 21:05:57 +0000 (21:05 +0000)]
Auto merge of #1963 - Frederick888:master, r=alexcrichton
The most common case is that if `cargo` is not installed to `/usr` but somewhere else such as `/usr/local` (is this the default install prefix? don't remember...), user will see `cargo: command not found` after `sudo su` executed.
P.S. sorry for previous wrong PR... there was a redundant commit.
Frederick Zhang [Wed, 2 Sep 2015 20:59:13 +0000 (04:59 +0800)]
avoid warning when cargo not found
bors [Tue, 1 Sep 2015 18:32:43 +0000 (18:32 +0000)]
Auto merge of #1959 - lucab:lucab/skip-dotdir, r=alexcrichton
Cargo recursively looks for TOML manifest into child directories,
sometimes getting into unrelated files when exploring hidden
directories (eg. quilt .pc).
This commit lets cargo skip dot directories, to partially avoid
the issues described in #1423.
Signed-off-by: Luca Bruno <lucab@debian.org>
Alex Crichton [Tue, 1 Sep 2015 17:14:32 +0000 (10:14 -0700)]
Only document platform-relevant dependencies
The recent change in #1939 ended up accidentally pulling in irrelevant
platform-specific dependencies into a normal `cargo doc`, causing those builds
to fail. This change tweaks the logic for calculating documentation dependencies
to account for filtering based on the relevant platform.
Luca Bruno [Sat, 29 Aug 2015 09:20:13 +0000 (11:20 +0200)]
path: do not recurse into hidden/dot directories
Cargo recursively looks for TOML manifest into child directories,
sometimes getting into unrelated files when exploring hidden
directories (eg. quilt .pc).
This commit lets cargo skip dot directories, to partially avoid
the issues described in #1423.
Signed-off-by: Luca Bruno <lucab@debian.org>
Jeffrey Yasskin [Tue, 1 Sep 2015 05:05:04 +0000 (22:05 -0700)]
Reset `parent`, `cur`, and `dep` when backtracking.
Jeffrey Yasskin [Tue, 1 Sep 2015 04:53:16 +0000 (21:53 -0700)]
Fix @alexcrichton's comments.
Jeffrey Yasskin [Tue, 1 Sep 2015 03:56:35 +0000 (20:56 -0700)]
Merge past #1939.
bors [Tue, 1 Sep 2015 03:16:17 +0000 (03:16 +0000)]
Auto merge of #1960 - alexcrichton:build-static, r=huonw
There's no real reason to eagerly link build scripts dynamically as they're not
going to benefit that much from dynamic linking. Most of the time they only have
one dynamic dependency, libstd, and most other Rust programs don't link it
dynamically so there's not really many space savings either.
Alex Crichton [Tue, 1 Sep 2015 02:49:41 +0000 (19:49 -0700)]
Don't link build scripts dynamically
There's no real reason to eagerly link build scripts dynamically as they're not
going to benefit that much from dynamic linking. Most of the time they only have
one dynamic dependency, libstd, and most other Rust programs don't link it
dynamically so there's not really many space savings either.
bors [Tue, 1 Sep 2015 02:36:44 +0000 (02:36 +0000)]
Auto merge of #1939 - impl:resolve-deps-with-host-triple, r=alexcrichton
This fixes a specific issue with platform-specific dependencies of build dependencies when cross-compiling. The gist of the problem is that when dependencies are initially resolved, only the target platform is considered, which can cause the later analysis of the graph by the custom build process to miss dependencies.
I fixed the issue by including both target and host platforms in the dependency resolution process. I'm brand new to the Rust ecosystem and language, so I'm not sure if this is the right route architecturally, or if my code is even remotely acceptable. Any feedback would be greatly appreciated!
I've also included a test case to demonstrate the problem; it fails against the current master.
Thanks!
bors [Tue, 1 Sep 2015 02:23:25 +0000 (02:23 +0000)]
Auto merge of #1955 - carols10cents:even-more-manifest-path-consistency, r=alexcrichton
Hiii :) This builds on #1953, so if yinz like this better, I'll close that one.
This PR makes all commands that take `--manifest-path` (except locate-project, see below) behave in a consistent way with regards to invalid paths, and hopefully gives better error messages.
This DOES break some instances where commands were "working", ie, completing their command successfully, with some path that they decided was right, not necessarily exactly the path that was passed in though. I'm not sure how this impacts whatever backwards compatibility guarantees cargo has. Given that those cases weren't using a valid path to an existing Cargo.toml, hopefully no one is relying on that behavior?
So locate-project... I'm not sure what to do about that one, exactly... If we define `--manifest-path` as a path to a Cargo.toml, then uhhhh we've located the project, it's right where you told us it is ;) So I think we should change it to be `--search-path` or similar? I'm too sleepy to take care of that tonight, so I just left it out of the manifest path tests.
Carol (Nichols || Goulding) [Tue, 1 Sep 2015 01:25:25 +0000 (21:25 -0400)]
Use find_root_manifest_for_cwd for now-duped code in verify-project
Carol (Nichols || Goulding) [Sun, 30 Aug 2015 03:17:31 +0000 (23:17 -0400)]
Give better error messages for invalid manifest-paths
Inspired by https://github.com/rust-lang/cargo/pull/1182.
Fixes #1158, #1772, #1773.
Carol (Nichols || Goulding) [Sun, 30 Aug 2015 03:16:20 +0000 (23:16 -0400)]
Add tests for different kinds of invalid manifest paths
Carol (Nichols || Goulding) [Sat, 29 Aug 2015 17:26:06 +0000 (13:26 -0400)]
Make verify-project able to verify the current working dir project
All other commands use the Cargo.toml in the current directory if
--manifest-path is not specified; this makes verify-project consistent.
Carol (Nichols || Goulding) [Sat, 29 Aug 2015 17:14:37 +0000 (13:14 -0400)]
Add tests for different arguments given to verify-project
Right now, only passing --manifest-path a path to a Cargo.toml file
works, but I think not specifying a path and verifying the current
working directory, if it has a Cargo.toml, should work as well for
consistency with all the other commands that optionally take
--manifest-path.
Carol (Nichols || Goulding) [Sat, 29 Aug 2015 17:03:05 +0000 (13:03 -0400)]
Make read-manifest accept consistent manifest-path arguments
And also preserve the existing behavior of accepting an absolute path to
a directory containing a Cargo.toml for backwards compatibility.
Carol (Nichols || Goulding) [Sat, 29 Aug 2015 16:08:12 +0000 (12:08 -0400)]
Add tests for different arguments given to read-manifest
Right now, only passing --manifest-path an absolute path to the
parent directory of a Cargo.toml file works, but I think the other
tests should work as well for consistency with other commands that
optionally take --manifest-path.
Noah Fontes [Mon, 31 Aug 2015 23:33:29 +0000 (16:33 -0700)]
Fix platform-specific dependency resolution for custom builds.
This change resolves dependencies against all possible platforms.
Activation of dependencies for a given target in the context of one
or more platforms is now wholly handled by cargo_rustc.
Nicolas Koch [Mon, 31 Aug 2015 10:24:49 +0000 (12:24 +0200)]
Make ::can_panic() return true on x86_64-pc-windows-msvc
Nicolas Koch [Mon, 31 Aug 2015 10:07:50 +0000 (12:07 +0200)]
Use internal error instead of ProcessError when multiple tests fail
bors [Sat, 29 Aug 2015 17:00:51 +0000 (17:00 +0000)]
Auto merge of #1943 - mseri:patch-1, r=alexcrichton
It maybe a tacky way, but I think that changing `util::without_prefix` is a bad approach. Maybe modify `process.build_command` could be another possible approach.
It could be worth to take more time to be sure to find the root of the problem. I am quite new to rust, if anybody can point out the right way of dealing with it, I will be happy to submit a new PR.
mseri [Sat, 29 Aug 2015 15:07:52 +0000 (16:07 +0100)]
Fix for test on windows
mseri [Sat, 29 Aug 2015 11:03:14 +0000 (12:03 +0100)]
Added test for issue #1942
bors [Fri, 28 Aug 2015 16:20:08 +0000 (16:20 +0000)]
Auto merge of #1931 - thirtythreeforty:printinfo, r=alexcrichton
Compare #1621. Like that pull request, this one solves #984.
I have rewritten most of @pyfisch's logic to account for @alexcrichton's comments. Specifically, this code will correctly handle adding/removing multiple versions of one package, as well as several packages with different sources, but the same name.
The output looks like this:
```
[georgev@desertvoice cargo]$ cargo update
Updating registry `https://github.com/rust-lang/crates.io-index`
Updating libc v0.1.8 -> v0.1.10
Updating memchr v0.1.3 -> v0.1.5
Updating num v0.1.26 -> v0.1.27
Updating rand v0.3.9 -> v0.3.10
Updating rustc-serialize v0.3.15 -> v0.3.16
```
Comments welcome.
r? @alexcrichton
mseri [Fri, 28 Aug 2015 09:28:17 +0000 (10:28 +0100)]
Improved fix for the issue #1942
George Hilliard [Sun, 17 May 2015 16:45:55 +0000 (18:45 +0200)]
Print information about updated packages on cargo update
Closes #984.
Nicolas Koch [Fri, 28 Aug 2015 02:55:04 +0000 (04:55 +0200)]
Reformat lines with more than 100 characters
Nicolas Koch [Fri, 28 Aug 2015 02:37:45 +0000 (04:37 +0200)]
Add test for --no-fail-fast
Nicolas Koch [Fri, 28 Aug 2015 01:31:35 +0000 (03:31 +0200)]
Cleaner implementation for --no-fail-fast.
This version also works for doctests.
Nicolas Koch [Thu, 27 Aug 2015 02:58:09 +0000 (04:58 +0200)]
Implement --no-fail-fast flag for cargo test.
This flag can be used to force cargo to run all tests, even if previous
tests failed. See #1904
bors [Thu, 27 Aug 2015 05:56:40 +0000 (05:56 +0000)]
Auto merge of #1950 - mbrubeck:cargo_profile, r=alexcrichton
None
Matt Brubeck [Thu, 27 Aug 2015 03:50:48 +0000 (20:50 -0700)]
Fix docs for the CARGO_PROFILE variable
bors [Wed, 26 Aug 2015 23:27:42 +0000 (23:27 +0000)]
Auto merge of #1945 - Frederick888:master, r=alexcrichton
This BASH function will find available cargo configurations recursively from the project directory to root and provide options for `--target`.
Frederick Zhang [Wed, 26 Aug 2015 18:54:55 +0000 (02:54 +0800)]
check and get dir by $PWD for Windows builds under Cygwin
Frederick Zhang [Wed, 26 Aug 2015 18:31:46 +0000 (02:31 +0800)]
avoid wrong invoking from non-project directory
Frederick Zhang [Wed, 26 Aug 2015 18:02:34 +0000 (02:02 +0800)]
add forgotten local declarations
Frederick Zhang [Wed, 26 Aug 2015 17:11:09 +0000 (01:11 +0800)]
bash completion for targets
mseri [Wed, 26 Aug 2015 14:37:07 +0000 (15:37 +0100)]
Fix for issue #1942 'cargo run fails if called from executable folder'
It maybe a hacky way but I think that changing `util::without_prefix` is a bad approach. Maybe modify `process.build_command` could be another possible approach.
Jeffrey Yasskin [Wed, 26 Aug 2015 03:23:33 +0000 (20:23 -0700)]
Allow inlining and fix up comments.
Since the algorithm isn't recursive anymore, inlining is fine.
Jeffrey Yasskin [Tue, 25 Aug 2015 05:12:55 +0000 (22:12 -0700)]
Clean up.
Jeffrey Yasskin [Tue, 25 Aug 2015 04:06:02 +0000 (21:06 -0700)]
Eliminate recursion!
Jeffrey Yasskin [Sat, 15 Aug 2015 21:50:53 +0000 (14:50 -0700)]
Extract the sibling activation function.
Jeffrey Yasskin [Sat, 15 Aug 2015 19:52:34 +0000 (12:52 -0700)]
Move all recursion to activate_deps.
Jeffrey Yasskin [Sat, 15 Aug 2015 16:08:58 +0000 (09:08 -0700)]
Remove an unnecessary lifetime parameter.
Jeffrey Yasskin [Sat, 15 Aug 2015 05:32:48 +0000 (22:32 -0700)]
Make activation_error always return an error.
Jeffrey Yasskin [Sat, 15 Aug 2015 03:38:23 +0000 (20:38 -0700)]
Add some type annotations to make it easier to read the resolver.
bors [Tue, 25 Aug 2015 23:18:58 +0000 (23:18 +0000)]
Auto merge of #1940 - steveklabnik:whoops, r=huonw
Thanks @huonw :sob:
Steve Klabnik [Tue, 25 Aug 2015 23:12:30 +0000 (19:12 -0400)]
Close some tags.
Thanks @huonw :sob:
bors [Tue, 25 Aug 2015 22:48:11 +0000 (22:48 +0000)]
Auto merge of #1936 - steveklabnik:gh1870, r=alexcrichton
Fixes #1870
bors [Tue, 25 Aug 2015 22:34:31 +0000 (22:34 +0000)]
Auto merge of #1934 - steveklabnik:gh1930, r=alexcrichton
Fixes #1930
bors [Tue, 25 Aug 2015 22:07:53 +0000 (22:07 +0000)]
Auto merge of #1935 - steveklabnik:gh1898, r=alexcrichton
Fixes #1898
bors [Tue, 25 Aug 2015 19:15:43 +0000 (19:15 +0000)]
Auto merge of #1938 - blaenk:environment-variables-fix, r=steveklabnik
#1845 seems to have forgotten to add the page to the DOCS variable in the makefile
Jorge Israel Peña [Tue, 25 Aug 2015 19:10:58 +0000 (12:10 -0700)]
make sure that environment-variables page is built
PR 1845 seems to have forgotten to add the page to the DOCS variable in
the makefile
Steve Klabnik [Tue, 25 Aug 2015 16:53:18 +0000 (12:53 -0400)]
Update guide to use crates.io dependencies
Fixes #1930
Steve Klabnik [Tue, 25 Aug 2015 17:00:45 +0000 (13:00 -0400)]
Add a note to the FAQ about * for library dependencies
Fixes #1870
Steve Klabnik [Tue, 25 Aug 2015 16:58:02 +0000 (12:58 -0400)]
Make note about small divergance from SemVer
Fixes #1898
bors [Tue, 25 Aug 2015 16:31:53 +0000 (16:31 +0000)]
Auto merge of #1845 - steveklabnik:env_vars, r=alexcrichton
These were spread out before, now they're in one place.
Fixes #1538
r? @alexcrichton
I'm also missing an entry on `CARGO_PROFILE`, what does it do?
Steve Klabnik [Mon, 27 Jul 2015 19:14:42 +0000 (15:14 -0400)]
Consolidate and document environment variables
These were spread out before, now they're in one place.
Fixes #1538
bors [Tue, 25 Aug 2015 16:20:19 +0000 (16:20 +0000)]
Auto merge of #1932 - steveklabnik:gh1767, r=alexcrichton
Fixes #1767
bors [Tue, 25 Aug 2015 16:08:03 +0000 (16:08 +0000)]
Auto merge of #1933 - steveklabnik:gh1855, r=alexcrichton
Fixes #1855
Steve Klabnik [Tue, 25 Aug 2015 15:57:44 +0000 (11:57 -0400)]
Clarify -- in cargo run help
Fixes #1855
Steve Klabnik [Tue, 25 Aug 2015 15:54:07 +0000 (11:54 -0400)]
Clarfiy that --{test,bench} select targets
Fixes #1767
bors [Fri, 21 Aug 2015 19:00:53 +0000 (19:00 +0000)]
Auto merge of #1928 - alexcrichton:update, r=alexcrichton
* Update dependencies that are getting warnings on nightly
* Tweak expected output of failing tests
Alex Crichton [Fri, 21 Aug 2015 18:44:16 +0000 (11:44 -0700)]
Update for Rust nightly
* Update dependencies that are getting warnings on nightly
* Tweak expected output of failing tests